package com.kizuki.redis;

import com.google.common.hash.BloomFilter;
import com.google.common.hash.Funnels;
import org.junit.Test;

public class TestBloomFilter {

    @Test
    public void test(){
        BloomFilter<Integer> filter = BloomFilter.create(Funnels.integerFunnel(), 2000, 0.01);
        System.out.println(filter.mightContain(100));
        System.out.println(filter.mightContain(10));
        filter.put(100);
        filter.put(10);
        System.out.println("after put");
        System.out.println(filter.mightContain(100));
        System.out.println(filter.mightContain(10));
    }

}
